<?php 

global $db;

@ $db = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

if(mysqli_connect_errno())
    die('The connection to the database could not be established.');

$db->query("SET NAMES '".DB_CHARSET."'");

?>